<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>Dept Layui Table </title>
    <#include "/header.html">
    <link rel="stylesheet" href="${request.contextPath}/statics/libs/layui/css/layui.css">
    <script src="${request.contextPath}/statics/libs/layui/layui.js"></script>
    <script src="${request.contextPath}/statics/libs/layui/lay/modules/table.js"></script>
</head>
<body>
<div >
    <form class="layui-form layui-form-pane" action="">
        <div class="layui-form-item">
            <input type="hidden" id="qctjbid" value="0">

            <!--<div class="layui-form-item layui-form-text">
              <label class="layui-form-label">编辑器</label>
              <div class="layui-input-inline">
                <textarea class="layui-textarea layui-hide" name="content" lay-verify="content" id="LAY_demo_editor"></textarea>
              </div>
            </div>-->

        </div>
    </form>
</div>
<table style="font-size:9px;"  class="layui-table-cell" class="layui-hide" id="test"></table>
</body>
<!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->
<script>
    var $;
    var form;
    var $form;
    var table ;

    layui.use(['form','table'], function(){
        $=layui.jquery;
        form= layui.form;
        $form=$('form');

        table=layui.table;

        //alert(qctjbid);
        table.render({
            elem: '#test'
            ,url:baseURL +'sys/sysdept1/dept'
            ,toolbar:true
            ,cols: [[
                {field:'deptid', width:50, title: '序号', sort: true, style:'display:none;'}
                ,{field:'name', width:200, title: '部门名称'}
                ,{field:'orderNum', title: '排序', width: 100}
                ,{field:'deptcode', width:200, title: '部门编号'}
            ]]
            ,page: true
        });
        $('table.layui-table thead tr th:eq(0)').addClass('layui-hide');
        form.render();

        //监听提交
        form.on('submit(demo1)', function(data){
            // $("#test").show();
            return false;
        });


    });
</script>
</html>